<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <div>
    <div>
      <span>{{str}}</span>
      <br>
      <br>
      <button @click="reverseArray">逆转</button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return{
      str:'Hello,World'
    }
  },
  methods:{
    reverseArray(){
      this.str=this.str.split('').reverse().join('')
    }
  }
}
</script>

<style lang="less">

</style>